<template>
	<view class="container">
		<view v-if="list.length > 0">
			<view class="box" v-for="(item, index) in list" :key="index">
				<view class="uni-inline-item">
					<image mode="widthFix" :src="item.headImgUrl || '../../../static/images/default.png'" class="pic"></image>
					<view class="uni-flex-item">
						<view class="name">{{item.storeName}}</view>
						<view class="p">{{userPhone}}</view>
					</view>
				</view>
				<view class="uni-flex">
					<view class="uni-flex-item">
						<view class="dt">今日出货</view>
						<view class="dd">{{item.todaySaleCount}}套</view>
					</view>
					<view class="uni-flex-item">
						<view class="dt">本月出货</view>
						<view class="dd">{{item.monthSaleCount}}套</view>
					</view>
				</view>
			</view>
		</view>
		<view v-else>
			<u-empty mode="favor" icon="../../../../static/images/comment.png" text="暂无记录" width="320" height="320"
				textSize="24"></u-empty>
		</view>
	</view>
</template>


<script>
	export default {
		data() {
			return {
				list: [],
			}

		},
		
		onLoad() {
			let that = this;
			that.getStoreSale();
		},
		
		onShow() {
			
		},

		methods: {
			getStoreSale() {
				let that = this;
				that.$request.get('user/getStoreList', {
					userInfoId: that.$store.state.app.uid
				}).then(res => {
					that.list = res.value.list
				}).catch(err => {
					that.$util.Tips({
						title: err
					})
				})
			}
		}
	}
</script>

<style>
	page {
		background: #F8F8F8;
	}
	.container{padding: 20rpx;}
	.container .box{background: #FFFFFF;padding: 20rpx;border-radius: 14rpx;margin-bottom: 20rpx;}
	.container .pic {
		width: 90rpx;margin-right: 20rpx;
		height: 90rpx;
	}
	.container .name{font-weight: bold;}
	.container .p{color: #666;}
	.container .uni-flex{margin-top: 20rpx;text-align: center;font-size: 32rpx;}
	.container .dt{font-size: 24rpx;color: #9C9C9C;}
	.container .uni-flex .uni-flex-item{position: relative;}
	.container .uni-flex .uni-flex-item+.uni-flex-item::after{content: '';display: block;border-left: 1px solid #eee;height: 50rpx;position: absolute;left: 0;top: 50%;transform: translate(0,-50%);}
</style>
